package com.run2code.design.structural.adapter.impl;

import com.run2code.design.structural.adapter.CreditAdapterService;
import com.run2code.design.structural.adapter.out.QiXinBaoService;

/**
 * 适配器模式 - 企信保接口实现类
 * 关注公众号【奔跑的码畜】，一起进步不迷路
 *
 * @author 第七人格
 * @date 2023/11/22
 */
public class QiXinBaoServiceImpl implements CreditAdapterService {

    private QiXinBaoService qiXinBaoService = new QiXinBaoService();

    @Override
    public boolean isLevelOne(String creditCode) {
        return qiXinBaoService.queryEnterpriseLevel(creditCode) == 1L;
    }
}
